/*
 * FaceCat图形通讯框架(非开源)
 * 著作权编号:2015SR229355+2020SR0266727
 * 上海卷卷猫信息技术有限公司
 */

#include "stdafx.h"
#include "CYear.h"

namespace FaceCat{
    void CYear::createMonths(){
        for (int i = 1; i <= 12; i++){
            Months.put(i, new CMonth(m_year, i));
        }
    }
    
    CYear::CYear(int year){
        m_year = year;
        createMonths();
    }
    
    CYear::~CYear(){
        for(int i = 0; i < Months.size(); i++){
            CMonth *month = Months.getValue(i);
            delete month;
        }
        Months.clear();
    }
}
